<?php $wp_query = new WP_Query(array('cat'=>of_get_option('category_news'), 'posts_per_page'=>of_get_option('postnumber_news'), 'paged'=>$paged)); ?>
<?php if ($wp_query->have_posts()) :
		while($wp_query->have_posts()) : $wp_query->the_post(); ?>
<?php if (isset($_POST['featurevid'])){
	$custom = get_post_custom($post->ID);
	$featurevid = $custom['featurevid'][0];
} ?>
<?php if ( has_post_thumbnail()) {
	$thumb = wp_get_attachment_image_src(get_post_thumbnail_id(), 'featured-medium');
} ?>
<?php global $more; $more = 0; ?>

<?php $title = esc_attr( sprintf( __( '%s', 'vnnews' ), the_title_attribute( 'echo=0' ) ) ); ?>

<!-- BEGIN .information -->
<div class="information radius-full shadow">

	<!-- BEGIN .sixteen columns -->
	<div class="sixteen columns">

		<!-- BEGIN .article -->
		<div class="article">

			<?php if ( has_post_thumbnail() || ( get_post_meta($post->ID, 'featurevid', true) ) ) { ?>

				<?php if ( get_post_meta($post->ID, 'featurevid', true) ) { ?>
					<div class="feature-vid"><?php echo get_post_meta($post->ID, 'featurevid', true); ?></div>
				<?php } else { ?>
					<a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php echo $title; ?>">
						<img class="feature-img" src="<?php echo $thumb[0]; ?>" alt="<?php echo $title; ?>" />
					</a>
				<?php } ?>

			<?php } ?>

			<h2 class="title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>

			<div class="post-author">
				<p class="align-left"><i class="icon-time"></i>
					&nbsp;By: <?php esc_url ( the_author_posts_link() ); ?>&nbsp;|
					&nbsp;<?php the_time(__("F j, Y", 'vnnews')); ?>&nbsp;|
					&nbsp;<?php _e("Written in ", 'vnnews'); the_category(', '); ?></p>
				<p class="align-right"><i class="icon-comment"></i> &nbsp;<a href="<?php the_permalink(); ?>#comments"><?php comments_number(__("Comment", 'vnnews'), __("1 Comment", 'vnnews'), '% Comments'); ?></a></p>
			</div>

			<div class="excerpt">
				<?php the_excerpt(); ?>
			</div>

			<div class="post-social">
				<p class="align-left no-space">
				</p>
				<p class="align-right no-space">
					<a class="post-readmore" href="<?php the_permalink(); ?>" title="<?php echo $title; ?>"></a>
				</p>
			</div>

		<!-- END .article -->
		</div>

	<!-- END .sixteen columns -->
	</div>

<!-- END .information -->
</div>

<?php endwhile; ?>

<?php if ($wp_query->max_num_pages > 1) { ?>
	<!-- BEGIN .pagination -->
	<div class="pagination">
		<?php echo vnnews_get_pagination_links(); ?>
	<!-- END .pagination -->
	</div>
<?php } ?>

<?php else : ?>

<!-- BEGIN .article -->
<div class="article">

	<h2 class="title"><?php _e("No Posts Found", 'vnnews'); ?></h2>
	<p><?php _e("We're sorry, but no posts have been found. Create a post to be added to this section, and configure your theme options.", 'vnnews'); ?></p>

<!-- END .article -->
</div>

<?php endif; ?>
<?php wp_reset_postdata(); ?>